package miiteen.sys.shiro;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@ConfigurationProperties(prefix = "shiro")
public class ShiroProperties {

    //登录url
    private String loginUrl;
    //登录成功url
    private String successUrl;
    //没有权限跳转页面
    private String unauthorizedUrl;

    /**
     * 根据url进行权限控制
     */
    private List<String> filterChainDefinitions = new ArrayList<String>();

    public void setFilterChainDefinitions(List<String> filterChainDefinitions) {
        this.filterChainDefinitions = filterChainDefinitions;
    }

    public List<String> getFilterChainDefinitions() {
        return filterChainDefinitions;
    }

    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    public String getSuccessUrl() {
        return successUrl;
    }

    public void setSuccessUrl(String successUrl) {
        this.successUrl = successUrl;
    }

    public String getUnauthorizedUrl() {
        return unauthorizedUrl;
    }

    public void setUnauthorizedUrl(String unauthorizedUrl) {
        this.unauthorizedUrl = unauthorizedUrl;
    }
}
